package com.zxx.admin.controller.base;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zxx.admin.entity.base.CodeStudyDetailEntity;
import com.zxx.admin.service.base.CodeStudyDetailService;

import com.baomidou.mybatisplus.extension.api.R;
import com.zxx.admin.utils.SpliceUtil;
import com.zxx.admin.vo.code.CodeStudyVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
 * @Description:  控制层
 * @author: zhuangxx
 * @date 2020-07-13
 */
@RestController
@RequestMapping("study/code/detail")
@ApiModel(value="", description="")
@Api(description = "")
public class CodeStudyDetailController  {

    /**
     * CodeStudyDetail  服务
     */
    @Autowired
    private CodeStudyDetailService codeStudyDetailService;


    /**
     * @Description 查询CodeStudyVO
     * @Author zhuangxx
     * @Date 2020-3-26
     * @return CodeStudyVO
     */
    @GetMapping(value = "getById")
    @ApiOperation(value = "返回CodeStudyVO", notes = "返回CodeStudyVO")
    public R<CodeStudyVO> getById(
            @ApiParam(name = "codeNo", value = "codeId", defaultValue = "")
            @RequestParam(value = "codeNo", required = false) String codeNo) {
        return R.ok(codeStudyDetailService.getCodeById(codeNo));
    }


}
